<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->

    <!-- Title -->
    <title>登录</title>

    <!-- Favicon -->
    <link rel="icon" href="img/core-img/favicon.png">

    <!-- Master Stylesheet [If you remove this CSS file, your file will be broken undoubtedly.] -->
    <link rel="stylesheet" href="style.css">

</head>

<body>


<div class="main-content- login-area-2 bg-img h-100vh dark-color-overlay" id="particles-js" style="background-image: url(img/bg-7.jpg);">
    <div class="container h-100">
        <div class="row h-100 justify-content-center align-items-center">
            <div class="col-md-7 col-lg-6 mx-auto">
                <!-- Middle Box -->
                <div class="middle-box  text-center">
                    <h3 class="mb-50 text-white">儿童汉字学习小程序 -- 管理员</h3>
                    <!-- Form -->
                    <div id="form" class="login-form" >
                        <!-- Form Group -->
                        <div class="form-group">
                            <input type="text" name="username" class="form-control" placeholder="账号" required="">
                        </div>

                        <!-- Form Group -->
                        <div class="form-group">
                            <input type="password" name="password" class="form-control" placeholder="密码" required="">
                        </div>
                        <button type="submit" onclick="_denglu()" class="btn btn-outline-success btn-block text-white mt-30">登录</button>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<!-- Must needed plugins to the run this Template -->
<script src="js/jquery.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bundle.js"></script>

<!-- Active JS -->
<script src="js/default-assets/active.js"></script>

<!-- These plugins only need for the run this page -->
<script src="js/default-assets/particles.js"></script>
<script src="js/default-assets/app.js"></script>
<script src="js/manifest.js"></script>
</body>
<script>
    const _denglu = function(){
        let input = ipt.getshuru('form','all');
        if(ipt.checkinput(input)){
            let nr = ZY.MaptoJson(ipt.gettext(input));
            s.sj(nr);
            s.sb('admin');
            s.se('tj','username,password');
            s.g('c/common_detail',{
                s:function(data){
                    if(data.code==200){
                        alert('登录成功');
                        mydata.set('aid',data.data.id);
                        window.location.href='nandu.html?nd=1';
                    }else{
                        alert('账号或密码错误');
                    }
                },
                e:function(e){
                    alert('网络错误');
                }
            })
        }
    }
</script>
</html>